package com.hdit.action.shop;

import java.util.List;

import javax.annotation.Resource;

import com.hdit.bean.Pager;
import com.hdit.bean.Pager.OrderType;
import com.hdit.entity.Product;
import com.hdit.entity.ProductCategory;
import com.hdit.service.ProductCategoryService;
import com.hdit.service.ProductService;

import org.apache.commons.lang.StringUtils;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator;
import com.opensymphony.xwork2.validator.annotations.Validations;

/**
 * 前台Action类 - 商品
 * ============================================================================
 */

@ParentPackage("shop")
public class ProductAction extends BaseShopAction {

	private static final long serialVersionUID = -4969421249817468001L;

	private ProductCategory productCategory;
	private String orderType;// 排序类型
	private String viewType;// 查看类型
	

	private Product product;
	
	
	private String p0;//
	private String p1;//
	private String p2;//
	private String p3;//
	private String p4;//
	
	private String p5;//
	private String p6;//
	private String p7;//
	private String p8;//
	private String p9;//
	
	private String p10;//
	private String p11;//
	private String p12;//
	private String p13;//
	private String p14;//
	
	private String p15;//
	private String p16;//
	private String p17;//
	private String p18;//
	private String p19;//
	
	private String p20;//
	private String p21;//
	private String p22;//
	private String p23;//
	private String p24;//
	                
	private String p25;//
	private String p26;//
	private String p27;//
	private String p28;//
	private String p29;//

	private String p30;//
	private String p31;//
	private String p32;//
	private String p33;//
	private String p34;//
	                
	private String p35;//
	private String p36;//
	private String p37;//
	private String p38;//
	private String p39;//
	
	
	private List<ProductCategory> rootProductCategoryList;
	
	private List<Product> bestProductList;
	private List<Product> hotProductList;
	private List<Product> newProductList;
	private List<ProductCategory> pathList;
	
	@Resource
	private ProductService productService;
	@Resource
	private ProductCategoryService productCategoryService;

	//光学架查询
	@InputConfig(resultName = "error")
		public String list() {
			productCategory = productCategoryService.load(id);
			bestProductList = productService.getBestProductList(productCategory, Product.MAX_BEST_PRODUCT_LIST_COUNT);
			hotProductList = productService.getHotProductList(productCategory, Product.MAX_HOT_PRODUCT_LIST_COUNT);
			newProductList = productService.getNewProductList(productCategory, Product.MAX_NEW_PRODUCT_LIST_COUNT);
			pathList = productCategoryService.getProductCategoryPathList(productCategory);
			
			if (pager == null) {
				pager = new Pager();
				pager.setPageSize(Product.DEFAULT_PRODUCT_LIST_PAGE_SIZE);
			}
			
			else{
				pager.setPageSize(Product.DEFAULT_PRODUCT_LIST_PAGE_SIZE);
				
			}
			pager.setProperty(null);
			pager.setKeyword(null);
			
	//		if (StringUtils.equalsIgnoreCase(orderType, "priceAsc")) {
	//			pager.setOrderBy("price");
	//			pager.setOrderType(OrderType.asc);
	//		} else if (StringUtils.equalsIgnoreCase(orderType, "priceDesc")) {
	//			pager.setOrderBy("price");
	//			pager.setOrderType(OrderType.desc);
	//		} else if (StringUtils.equalsIgnoreCase(orderType, "dateAsc")) {
	//			pager.setOrderBy("createDate");
	//			pager.setOrderType(OrderType.asc);
	//		} else {
	//			pager.setOrderBy(null);
	//			pager.setOrderType(null);
	//		}
	//		
	//		
	//		
	//		
	//		pager = productService.getProductPager(productCategory, pager);
			
			
			DetachedCriteria detachedCriteria = DetachedCriteria.forClass(Product.class);
			
			if((this.getP0()!=null)&&!(this.getP0().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p0", this.getP0()));
			if((this.getP1()!=null)&&!(this.getP1().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p1", this.getP1()));
			if((this.getP2()!=null)&&!(this.getP2().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p2", this.getP2()));
			if((this.getP3()!=null)&&!(this.getP3().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p3", this.getP3()));
			if((this.getP4()!=null)&&!(this.getP4().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p4", this.getP4()));
			
			if((this.getP5()!=null)&&!(this.getP5().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p5", this.getP5()));
			if((this.getP6()!=null)&&!(this.getP6().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p6", this.getP6()));
			if((this.getP7()!=null)&&!(this.getP7().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p7", this.getP7()));
			if((this.getP8()!=null)&&!(this.getP8().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p8", this.getP8()));
			if((this.getP9()!=null)&&!(this.getP9().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p9", this.getP9()));
			
			
			if((this.getP10()!=null)&&!(this.getP10().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p10", this.getP10()));
			if((this.getP11()!=null)&&!(this.getP11().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p11", this.getP11()));
			if((this.getP12()!=null)&&!(this.getP12().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p12", this.getP12()));
			if((this.getP13()!=null)&&!(this.getP13().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p13", this.getP13()));
			if((this.getP14()!=null)&&!(this.getP14().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p14", this.getP14()));
			
			if((this.getP15()!=null)&&!(this.getP15().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p15", this.getP15()));
			if((this.getP16()!=null)&&!(this.getP16().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p16", this.getP16()));
			if((this.getP17()!=null)&&!(this.getP17().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p17", this.getP17()));
			if((this.getP18()!=null)&&!(this.getP18().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p18", this.getP18()));
			if((this.getP19()!=null)&&!(this.getP19().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p19", this.getP19()));
			
			if((this.getP20()!=null)&&!(this.getP20().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p20", this.getP20()));
			if((this.getP21()!=null)&&!(this.getP21().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p21", this.getP21()));
			if((this.getP22()!=null)&&!(this.getP22().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p22", this.getP22()));
			if((this.getP23()!=null)&&!(this.getP23().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p23", this.getP23()));
			if((this.getP24()!=null)&&!(this.getP24().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p24", this.getP24()));
			
			if((this.getP25()!=null)&&!(this.getP25().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p25", this.getP25()));
			if((this.getP26()!=null)&&!(this.getP26().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p26", this.getP26()));
			if((this.getP27()!=null)&&!(this.getP27().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p27", this.getP27()));
			if((this.getP28()!=null)&&!(this.getP28().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p28", this.getP28()));
			if((this.getP29()!=null)&&!(this.getP29().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p29", this.getP29()));
			
			if((this.getP30()!=null)&&!(this.getP30().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p30", this.getP30()));
			if((this.getP31()!=null)&&!(this.getP31().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p31", this.getP31()));
			if((this.getP32()!=null)&&!(this.getP32().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p32", this.getP32()));
			if((this.getP33()!=null)&&!(this.getP33().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p33", this.getP33()));
			if((this.getP34()!=null)&&!(this.getP34().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p34", this.getP34()));
			
			if((this.getP35()!=null)&&!(this.getP35().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p35", this.getP35()));
			if((this.getP36()!=null)&&!(this.getP36().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p36", this.getP36()));
			if((this.getP37()!=null)&&!(this.getP37().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p37", this.getP37()));
			if((this.getP38()!=null)&&!(this.getP38().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p38", this.getP38()));
			if((this.getP39()!=null)&&!(this.getP39().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p39", this.getP39()));
			
			detachedCriteria.add(Restrictions.eq("productCategory.id", "1"));
			
			pager = productService.findByPager(pager, detachedCriteria);
			
	//		if (StringUtils.equalsIgnoreCase(viewType, "tableType")) {
	//			return "table_list";
	//		} else {
	//			return "picture_list";
	//		}
			getResponse().setContentType("text/xml;charset=UTF-8");    
			return "picture_list";
		}


	//太阳镜查询
		@InputConfig(resultName = "error")
		public String list1() {
			productCategory = productCategoryService.load(id);
			bestProductList = productService.getBestProductList(productCategory, Product.MAX_BEST_PRODUCT_LIST_COUNT);
			hotProductList = productService.getHotProductList(productCategory, Product.MAX_HOT_PRODUCT_LIST_COUNT);
			newProductList = productService.getNewProductList(productCategory, Product.MAX_NEW_PRODUCT_LIST_COUNT);
			pathList = productCategoryService.getProductCategoryPathList(productCategory);
			
			if (pager == null) {
				pager = new Pager();
				pager.setPageSize(Product.DEFAULT_PRODUCT_LIST_PAGE_SIZE);
			}
			pager.setProperty(null);
			pager.setKeyword(null);
			
	//		if (StringUtils.equalsIgnoreCase(orderType, "priceAsc")) {
	//			pager.setOrderBy("price");
	//			pager.setOrderType(OrderType.asc);
	//		} else if (StringUtils.equalsIgnoreCase(orderType, "priceDesc")) {
	//			pager.setOrderBy("price");
	//			pager.setOrderType(OrderType.desc);
	//		} else if (StringUtils.equalsIgnoreCase(orderType, "dateAsc")) {
	//			pager.setOrderBy("createDate");
	//			pager.setOrderType(OrderType.asc);
	//		} else {
	//			pager.setOrderBy(null);
	//			pager.setOrderType(null);
	//		}
	//		
	//		
	//		
	//		
	//		pager = productService.getProductPager(productCategory, pager);
			
			
			DetachedCriteria detachedCriteria = DetachedCriteria.forClass(Product.class);
			
			if((this.getP0()!=null)&&!(this.getP0().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p0", this.getP0()));
			if((this.getP1()!=null)&&!(this.getP1().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p1", this.getP1()));
			if((this.getP2()!=null)&&!(this.getP2().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p2", this.getP2()));
			if((this.getP3()!=null)&&!(this.getP3().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p3", this.getP3()));
			if((this.getP4()!=null)&&!(this.getP4().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p4", this.getP4()));
			
			if((this.getP5()!=null)&&!(this.getP5().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p5", this.getP5()));
			if((this.getP6()!=null)&&!(this.getP6().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p6", this.getP6()));
			if((this.getP7()!=null)&&!(this.getP7().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p7", this.getP7()));
			if((this.getP8()!=null)&&!(this.getP8().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p8", this.getP8()));
			if((this.getP9()!=null)&&!(this.getP9().trim().equals("")))
				detachedCriteria.add(Restrictions.eq("p9", this.getP9()));
			
			detachedCriteria.add(Restrictions.eq("productCategory.id", "1"));
			
			pager = productService.findByPager(pager, detachedCriteria);
			
	//		if (StringUtils.equalsIgnoreCase(viewType, "tableType")) {
	//			return "table_list";
	//		} else {
	//			return "picture_list";
	//		}
			getResponse().setContentType("text/xml;charset=UTF-8");    
			return "picture_list1";
		}


	//太阳镜查询
			@InputConfig(resultName = "error")
			public String list2() {
				productCategory = productCategoryService.load(id);
				bestProductList = productService.getBestProductList(productCategory, Product.MAX_BEST_PRODUCT_LIST_COUNT);
				hotProductList = productService.getHotProductList(productCategory, Product.MAX_HOT_PRODUCT_LIST_COUNT);
				newProductList = productService.getNewProductList(productCategory, Product.MAX_NEW_PRODUCT_LIST_COUNT);
				pathList = productCategoryService.getProductCategoryPathList(productCategory);
				
				if (pager == null) {
					pager = new Pager();
					pager.setPageSize(Product.DEFAULT_PRODUCT_LIST_PAGE_SIZE);
				}
				
				else{
					pager.setPageSize(Product.DEFAULT_PRODUCT_LIST_PAGE_SIZE);
					
				}
				pager.setProperty(null);
				pager.setKeyword(null);
				
		//		if (StringUtils.equalsIgnoreCase(orderType, "priceAsc")) {
		//			pager.setOrderBy("price");
		//			pager.setOrderType(OrderType.asc);
		//		} else if (StringUtils.equalsIgnoreCase(orderType, "priceDesc")) {
		//			pager.setOrderBy("price");
		//			pager.setOrderType(OrderType.desc);
		//		} else if (StringUtils.equalsIgnoreCase(orderType, "dateAsc")) {
		//			pager.setOrderBy("createDate");
		//			pager.setOrderType(OrderType.asc);
		//		} else {
		//			pager.setOrderBy(null);
		//			pager.setOrderType(null);
		//		}
		//		
		//		
		//		
		//		
		//		pager = productService.getProductPager(productCategory, pager);
				
				
				DetachedCriteria detachedCriteria = DetachedCriteria.forClass(Product.class);
				
				if((this.getP0()!=null)&&!(this.getP0().trim().equals("")))
					detachedCriteria.add(Restrictions.eq("p0", this.getP0()));
				if((this.getP1()!=null)&&!(this.getP1().trim().equals("")))
					detachedCriteria.add(Restrictions.eq("p1", this.getP1()));
				if((this.getP2()!=null)&&!(this.getP2().trim().equals("")))
					detachedCriteria.add(Restrictions.eq("p2", this.getP2()));
				if((this.getP3()!=null)&&!(this.getP3().trim().equals("")))
					detachedCriteria.add(Restrictions.eq("p3", this.getP3()));
				if((this.getP4()!=null)&&!(this.getP4().trim().equals("")))
					detachedCriteria.add(Restrictions.eq("p4", this.getP4()));
				
				if((this.getP5()!=null)&&!(this.getP5().trim().equals("")))
					detachedCriteria.add(Restrictions.eq("p5", this.getP5()));
				if((this.getP6()!=null)&&!(this.getP6().trim().equals("")))
					detachedCriteria.add(Restrictions.eq("p6", this.getP6()));
				if((this.getP7()!=null)&&!(this.getP7().trim().equals("")))
					detachedCriteria.add(Restrictions.eq("p7", this.getP7()));
				if((this.getP8()!=null)&&!(this.getP8().trim().equals("")))
					detachedCriteria.add(Restrictions.eq("p8", this.getP8()));
				if((this.getP9()!=null)&&!(this.getP9().trim().equals("")))
					detachedCriteria.add(Restrictions.eq("p9", this.getP9()));
				
				detachedCriteria.add(Restrictions.eq("productCategory.id", "2"));
				
				pager = productService.findByPager(pager, detachedCriteria);
				
		//		if (StringUtils.equalsIgnoreCase(viewType, "tableType")) {
		//			return "table_list";
		//		} else {
		//			return "picture_list";
		//		}
				getResponse().setContentType("text/xml;charset=UTF-8");    
				return "picture_list2";
			}


	//镜片查询
	@InputConfig(resultName = "error")
	public String list5() {
		productCategory = productCategoryService.load(id);
		bestProductList = productService.getBestProductList(productCategory, Product.MAX_BEST_PRODUCT_LIST_COUNT);
		hotProductList = productService.getHotProductList(productCategory, Product.MAX_HOT_PRODUCT_LIST_COUNT);
		newProductList = productService.getNewProductList(productCategory, Product.MAX_NEW_PRODUCT_LIST_COUNT);
		pathList = productCategoryService.getProductCategoryPathList(productCategory);
		
		if (pager == null) {
			pager = new Pager();
			pager.setPageSize(Product.DEFAULT_PRODUCT_LIST_PAGE_SIZE);
		}
		
		else{
			pager.setPageSize(Product.DEFAULT_PRODUCT_LIST_PAGE_SIZE);
			
		}
		pager.setProperty(null);
		pager.setKeyword(null);
		
//		if (StringUtils.equalsIgnoreCase(orderType, "priceAsc")) {
//			pager.setOrderBy("price");
//			pager.setOrderType(OrderType.asc);
//		} else if (StringUtils.equalsIgnoreCase(orderType, "priceDesc")) {
//			pager.setOrderBy("price");
//			pager.setOrderType(OrderType.desc);
//		} else if (StringUtils.equalsIgnoreCase(orderType, "dateAsc")) {
//			pager.setOrderBy("createDate");
//			pager.setOrderType(OrderType.asc);
//		} else {
//			pager.setOrderBy(null);
//			pager.setOrderType(null);
//		}
//		
//		
//		
//		
//		pager = productService.getProductPager(productCategory, pager);
		
		
		DetachedCriteria detachedCriteria = DetachedCriteria.forClass(Product.class);
		
		if((this.getP0()!=null)&&!(this.getP0().trim().equals("")))
			detachedCriteria.add(Restrictions.eq("p0", this.getP0()));
		if((this.getP1()!=null)&&!(this.getP1().trim().equals("")))
			detachedCriteria.add(Restrictions.eq("p1", this.getP1()));
		if((this.getP2()!=null)&&!(this.getP2().trim().equals("")))
			detachedCriteria.add(Restrictions.eq("p2", this.getP2()));
		if((this.getP3()!=null)&&!(this.getP3().trim().equals("")))
			detachedCriteria.add(Restrictions.eq("p3", this.getP3()));
		if((this.getP4()!=null)&&!(this.getP4().trim().equals("")))
			detachedCriteria.add(Restrictions.eq("p4", this.getP4()));
		
		if((this.getP5()!=null)&&!(this.getP5().trim().equals("")))
			detachedCriteria.add(Restrictions.eq("p5", this.getP5()));
		if((this.getP6()!=null)&&!(this.getP6().trim().equals("")))
			detachedCriteria.add(Restrictions.eq("p6", this.getP6()));
		if((this.getP7()!=null)&&!(this.getP7().trim().equals("")))
			detachedCriteria.add(Restrictions.eq("p7", this.getP7()));
		if((this.getP8()!=null)&&!(this.getP8().trim().equals("")))
			detachedCriteria.add(Restrictions.eq("p8", this.getP8()));
		if((this.getP9()!=null)&&!(this.getP9().trim().equals("")))
			detachedCriteria.add(Restrictions.eq("p9", this.getP9()));
		
		detachedCriteria.add(Restrictions.eq("productCategory.id", "5"));
		
		pager = productService.findByPager(pager, detachedCriteria);
		
//		if (StringUtils.equalsIgnoreCase(viewType, "tableType")) {
//			return "table_list";
//		} else {
//			return "picture_list";
//		}
		getResponse().setContentType("text/xml;charset=UTF-8");    
		return "picture_list5";
	}
	
	
	public String edit() {
		product = productService.load(id);
		return INPUT;
	}


	public String edit5() {
		product = productService.load(id);
		return "input5";
	}
	
	@Validations(
		requiredStrings = { 
			@RequiredStringValidator(fieldName = "pager.keyword", message = "搜索关键词不允许为空!") 
		}
	)
	@InputConfig(resultName = "error")
	public String search() throws Exception {
		bestProductList = productService.getBestProductList(Product.MAX_BEST_PRODUCT_LIST_COUNT);
		hotProductList = productService.getHotProductList(Product.MAX_HOT_PRODUCT_LIST_COUNT);
		newProductList = productService.getNewProductList(Product.MAX_NEW_PRODUCT_LIST_COUNT);
		
		if (pager == null) {
			pager = new Pager();
			pager.setPageSize(Product.DEFAULT_PRODUCT_LIST_PAGE_SIZE);
		}
		
		if (StringUtils.equalsIgnoreCase(orderType, "priceAsc")) {
			pager.setOrderBy("price");
			pager.setOrderType(OrderType.asc);
		} else if (StringUtils.equalsIgnoreCase(orderType, "priceDesc")) {
			pager.setOrderBy("price");
			pager.setOrderType(OrderType.desc);
		} else if (StringUtils.equalsIgnoreCase(orderType, "dateAsc")) {
			pager.setOrderBy("createDate");
			pager.setOrderType(OrderType.asc);
		} else {
			pager.setOrderBy(null);
			pager.setOrderType(null);
		}
		
		pager = productService.search(pager);
		
		if (StringUtils.equalsIgnoreCase(viewType, "tableType")) {
			return "table_search";
		} else {
			return "picture_search";
		}
	}

	public ProductCategory getProductCategory() {
		return productCategory;
	}

	public void setProductCategory(ProductCategory productCategory) {
		this.productCategory = productCategory;
	}

	public String getOrderType() {
		return orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	public String getViewType() {
		return viewType;
	}

	public void setViewType(String viewType) {
		this.viewType = viewType;
	}
	
	public List<ProductCategory> getRootProductCategoryList() {
		rootProductCategoryList = productCategoryService.getRootProductCategoryList();
		return rootProductCategoryList;
	}

	public void setRootProductCategoryList(List<ProductCategory> rootProductCategoryList) {
		this.rootProductCategoryList = rootProductCategoryList;
	}

	public List<Product> getBestProductList() {
		return bestProductList;
	}

	public void setBestProductList(List<Product> bestProductList) {
		this.bestProductList = bestProductList;
	}

	public List<Product> getHotProductList() {
		return hotProductList;
	}

	public void setHotProductList(List<Product> hotProductList) {
		this.hotProductList = hotProductList;
	}

	public List<Product> getNewProductList() {
		return newProductList;
	}

	public void setNewProductList(List<Product> newProductList) {
		this.newProductList = newProductList;
	}

	public List<ProductCategory> getPathList() {
		return pathList;
	}

	public void setPathList(List<ProductCategory> pathList) {
		this.pathList = pathList;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public String getP0() {
		return p0;
	}

	public void setP0(String p0) {
		this.p0 = p0;
	}

	public String getP1() {
		return p1;
	}

	public void setP1(String p1) {
		this.p1 = p1;
	}

	public String getP2() {
		return p2;
	}

	public void setP2(String p2) {
		this.p2 = p2;
	}

	public String getP3() {
		return p3;
	}

	public void setP3(String p3) {
		this.p3 = p3;
	}

	public String getP4() {
		return p4;
	}

	public void setP4(String p4) {
		this.p4 = p4;
	}

	public String getP5() {
		return p5;
	}

	public void setP5(String p5) {
		this.p5 = p5;
	}

	public String getP6() {
		return p6;
	}

	public void setP6(String p6) {
		this.p6 = p6;
	}

	public String getP7() {
		return p7;
	}

	public void setP7(String p7) {
		this.p7 = p7;
	}

	public String getP8() {
		return p8;
	}

	public void setP8(String p8) {
		this.p8 = p8;
	}

	public String getP9() {
		return p9;
	}

	public void setP9(String p9) {
		this.p9 = p9;
	}

	public String getP10() {
		return p10;
	}

	public void setP10(String p10) {
		this.p10 = p10;
	}

	public String getP11() {
		return p11;
	}

	public void setP11(String p11) {
		this.p11 = p11;
	}

	public String getP12() {
		return p12;
	}

	public void setP12(String p12) {
		this.p12 = p12;
	}

	public String getP13() {
		return p13;
	}

	public void setP13(String p13) {
		this.p13 = p13;
	}

	public String getP14() {
		return p14;
	}

	public void setP14(String p14) {
		this.p14 = p14;
	}

	public String getP15() {
		return p15;
	}

	public void setP15(String p15) {
		this.p15 = p15;
	}

	public String getP16() {
		return p16;
	}

	public void setP16(String p16) {
		this.p16 = p16;
	}

	public String getP17() {
		return p17;
	}

	public void setP17(String p17) {
		this.p17 = p17;
	}

	public String getP18() {
		return p18;
	}

	public void setP18(String p18) {
		this.p18 = p18;
	}

	public String getP19() {
		return p19;
	}

	public void setP19(String p19) {
		this.p19 = p19;
	}

	public String getP20() {
		return p20;
	}

	public void setP20(String p20) {
		this.p20 = p20;
	}

	public String getP21() {
		return p21;
	}

	public void setP21(String p21) {
		this.p21 = p21;
	}

	public String getP22() {
		return p22;
	}

	public void setP22(String p22) {
		this.p22 = p22;
	}

	public String getP23() {
		return p23;
	}

	public void setP23(String p23) {
		this.p23 = p23;
	}

	public String getP24() {
		return p24;
	}

	public void setP24(String p24) {
		this.p24 = p24;
	}

	public String getP25() {
		return p25;
	}

	public void setP25(String p25) {
		this.p25 = p25;
	}

	public String getP26() {
		return p26;
	}

	public void setP26(String p26) {
		this.p26 = p26;
	}

	public String getP27() {
		return p27;
	}

	public void setP27(String p27) {
		this.p27 = p27;
	}

	public String getP28() {
		return p28;
	}

	public void setP28(String p28) {
		this.p28 = p28;
	}

	public String getP29() {
		return p29;
	}

	public void setP29(String p29) {
		this.p29 = p29;
	}

	public String getP30() {
		return p30;
	}

	public void setP30(String p30) {
		this.p30 = p30;
	}

	public String getP31() {
		return p31;
	}

	public void setP31(String p31) {
		this.p31 = p31;
	}

	public String getP32() {
		return p32;
	}

	public void setP32(String p32) {
		this.p32 = p32;
	}

	public String getP33() {
		return p33;
	}

	public void setP33(String p33) {
		this.p33 = p33;
	}

	public String getP34() {
		return p34;
	}

	public void setP34(String p34) {
		this.p34 = p34;
	}

	public String getP35() {
		return p35;
	}

	public void setP35(String p35) {
		this.p35 = p35;
	}

	public String getP36() {
		return p36;
	}

	public void setP36(String p36) {
		this.p36 = p36;
	}

	public String getP37() {
		return p37;
	}

	public void setP37(String p37) {
		this.p37 = p37;
	}

	public String getP38() {
		return p38;
	}

	public void setP38(String p38) {
		this.p38 = p38;
	}

	public String getP39() {
		return p39;
	}

	public void setP39(String p39) {
		this.p39 = p39;
	}

	public ProductService getProductService() {
		return productService;
	}

	public void setProductService(ProductService productService) {
		this.productService = productService;
	}

	public ProductCategoryService getProductCategoryService() {
		return productCategoryService;
	}

	public void setProductCategoryService(
			ProductCategoryService productCategoryService) {
		this.productCategoryService = productCategoryService;
	}

	

	
}